import axios from '../utils/request'


//获取买家用户信息
export const BuyUserinfo = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-client-user-detail-buyer/get',
        data
    })
}
//获取卖家用户信息
export const SellUserinfo = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-client-user-detail-seller/get',
        data
    })
}


//首页用户列表信息
export const UserHomePage = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-index/get-group-user',
        data
    })
}
//首页获取why xpert
export const WhyXpert = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-index/list-why-xpert',
        data
    })
}
//首页获取why xpert
export const UserCases = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-index/list-user-cases',
        data
    })
}
//首页搜索接口
export const SearchProt = (data) => {
    return axios({
        baseURL: '',
        method: 'get',
        url: `/xpert-api/xpert/xp-search/user-search-list?pageSize=8&pageNo=${data.pageNum}&topicId=${data.topicId}&language=${data.language}&areaCode=${data.areaCode}&industry=${data.industry}&sortByColumns%5B${data.sortByColumns}%5D=${data.sortByColumnsSort}&keyWord=${data.keyword}`,
    })
}
//首页进入用户首页
export const MyPageView = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-seller/get-view?sellerUserId=` + data.userId,
    })
}
//评论标题列表
export const OrderReviewTitle = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders-review/order-review-title?sellerId=` + data.userId,
    })
}
//卖家首页gigs
export const ListBySeller = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-gigs/list-by-seller?sellerId=` + data.userId,
    })
}
//卖家评论
export const OrderReviewList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders-review/order-review-list?sellerId=${data.userId}&pageSize=10&pageNo=${data.pageNum}&title=${data.title}`,
    })
}
//举报gigs
export const CreateGigs = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-report/create-gigs`,
        data
    })
}
//举报订单
export const CreateUserOrder = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-report/create-xp-review`,
        data
    })
}
//举报用户接口
export const CreateUser = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-report/create-xp-user`,
        data
    })
}
//收藏gigs
export const FavoriteGigs = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/favorite/favorite-gigs?groupId=${data.groupId}&gigsId=${data.gigsId}`,
        data
    })
}
//收藏用户
export const FavoriteUser = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/favorite/favorite-user?groupId=${data.groupId}&userId=${data.userId}`,
        data
    })
}
//取消收藏用户
export const QuFavoriteUser = (data) => {
    return axios({
        method: 'delete',
        url: `/xpert-api/xpert/favorite/favorite-user?userId=${data.userId}`,
        data
    })
}
//取消收藏gigs
export const QuFavoriteGigs = (data) => {
    return axios({
        method: 'delete',
        url: `/xpert-api/xpert/favorite/favorite-gigs?gigsId=${data.gigsId}`,
        data
    })
}
//获取收藏分组
export const FavoritePage = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/favorite/page?type=${data.type}&name=${data.name}&pageSize=100&pageNo=1`,
        data
    })
}
//创建收藏分组
export const CreateClassification = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/favorite/create?name=${data.name}&type=${data.type}`,
        data
    })
}
//关联用户列表
export const RelevanceUserList = (data) => {
    return axios({
        method: 'get',
        // url: `/xpert-api/xpert/xp-gigs/get-relevance-user?sellerUserId=` + data.userId,
        url: `/xpert-api/xpert/xp-client-user-detail-seller/get-relevance-user?sellerUserId=` + data.userId,
        data
    })
}
//获取可工作月份
export const WorkMonth = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/seller-work-time/get-work-month?userIdXp=${data.userId}`,
        data
    })
}
//卖家用户详情
export const SellerUserDetails = (data) => {
    return axios({
        method: 'get',
        url: '/xpert-api/xpert/xp-client-user-detail-seller/get-edit',
        data
    })
}
//卖家更新用户详情
export const SellerUpdatesUserDetails = (data) => {
    return axios({
        method: 'post',
        url: '/xpert-api/xpert/xp-client-user-detail-seller/update',
        data
    })
}
//买家更新用户详情
export const BuyerUpdatesUserDetails = (data) => {
    return axios({
        method: 'post',
        url: '/xpert-api/xpert/xp-client-user-detail-buyer/update',
        data
    })
}
//FAQ列表
export const FaqsList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-faqs/faqs-list?pageSize=5&pageNo=${data.pageNum}`,
        data
    })
}
//FAQ列表详情
export const FaqsListDetils = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-faqs/faqs-info?id=${data.id}`,
        data
    })
}
//我的Gigs列表
export const MyGigsList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-gigs/my-list`,
        data
    })
}
//我的Gigs列表
export const CreateTime = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/seller-work-config/update-availability`,
        data
    })
}
//我的Gigs草稿列表
export const MyListDraft = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-gigs/my-list-draft`,
        data
    })
}
//我的Gigs列表更新添加
export const CreateGigsProblem = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-gigs/update-problem`,
        data
    })
}
//获取工作时间
export const GetWorkingTime = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/seller-work-config/get-availability-draft`,
        data
    })
}
//获取买家详情
export const BuyerUserDetils = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-buyer/get-view?userId=` + data.userId,
        data
    })
}
//获取买家详情
export const PubGigs = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-gigs/publish`,
        data
    })
}
//删除gigs
export const DeleteGigsList = (data) => {
    return axios({
        method: 'delete',
        url: `/xpert-api/xpert/xp-gigs/delete?id=` + data.id,
        data
    })
}
//获取删除列表
export const DeleteList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-gigs/my-list-delete?pageSize=5&pageNo=${data.pageNum}`,
        data
    })
}
//获取验证
export const CreateVerify = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-seller-verify/get`,
        data
    })
}
//更新验证
export const UpDataVerify = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-client-user-detail-seller-verify/update`,
        data
    })
}
//反馈
export const Feedback = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/feedback/create`,
        data
    })
}
//刷新token
export const refreshToken = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-client-auth/refresh-token?refreshToken=${data.refreshToken}`,
        data
    })
}
//折线图
export const LineChartView = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders/order-statistics-type?type=${data.type}&bindId=${data.bindId}&startTime=${data.startTime}&timeType=${data.timeType}`,
        data
    })
}
//订单统计
export const OrderStatisticsXp = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders/order-statistics`,
        data
    })
}
//订单统计
export const OrderReviewStatisticsTotal = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders-review/order-review-statistics-total`,
        data
    })
}
//我的订单
export const MyOrdersList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders/my-order`,
        data
    })
}
//我的request
export const MyPageRequest = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request/my-page?status=${data.status}&pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}
//我的request
export const MyPageRequests = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request/my-page?pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}
//感兴趣的request
export const InterestedRequest = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request/interested-list?pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}
//创建request
export const CreateRequestCount = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-request/create`,
        data
    })
}
//回显request
export const EchoRequestCount = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request/get?id=${data.id}&pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}

//修改request
export const ModifyRequestCount = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-request/edit`,
        data
    })
}
//取消request
export const CancelRequestCount = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-request/cancel?requestId=${data.requestId}`,
        data
    })
}
//request列表
export const MoerRequestCountList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request/page?keyWord=${data.keyWord}&topicIds=${data.topicIds}&pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}
//改变喜欢
export const ChangLive = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-request/like?id=${data.id}`,
        data
    })
}
//获取工作天
export const GetWorkingDays = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/seller-work-time/get-work-day?userIdXp=${data.userIdXp}&year=${data.year}&month=${data.month}`,
        data
    })
}
//获取可工作的时间
export const GetTheTimeYouCanWork = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/seller-work-time/get-work-time?userIdXp=${data.userIdXp}&year=${data.year}&month=${data.month}&day=${data.day}&workMinute=${data.workMinute}`,
        data
    })
}
//同意request申请
export const AgreeToTheRequestApplication = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-request-apply/agree-request-apply?applyId=${data.applyId}&meetingType=${data.meetingType}&startTime=${data.startTime}&timeInterval=${data.timeInterval}`,
        data
    })
}
//我的订单
export const MyListList = (data) => {
    return axios({
        method: 'get',
        // url: `/xpert-api/xpert/xp-orders/my-order?
        // status=${data.status1||''}&
        // status=${data.status2||''}&
        // status=${data.status3||''}&
        // status=${data.status4||''}&
        // status=${data.status5||''}&
        // status=${data.status6||''}&
        // status=${data.status7||''}&
        // status=${data.status8||''}&
        // status=${data.status9||''}&
        // status=${data.status10||''}&
        // status=${data.status11||''}&
        // pageNo=${data.pageNum}&pageSize=${data.pageSize}&type=${data.type}`,
        url: `/xpert-api/xpert/xp-orders/my-order?status=${data.status1||''}&status=${data.status2||''}&status=${data.status3||''}&status=${data.status4||''}&status=${data.status5||''}&status=${data.status6||''}&status=${data.status7||''}&status=${data.status8||''}&status=${data.status9||''}&status=${data.status10||''}&status=${data.status11||''}&pageNo=${data.pageNum}&pageSize=${data.pageSize}&type=${data.type}`,

        data
    })
}
//我的订单详情
export const DetailsOfMyOrder = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders/get-order-details?orderId=${data.orderId}`,
        data
    })
}
//创建订单
export const CreateOrder = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders/create-gigs`,
        data
    })
}
//创建自定义订单
export const CreateACustomOrder = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders/create-gigs-custom`,
        data
    })
}
//重新安排订单时间
export const RescheduleTheOrder = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders/reschedule-order`,
        data
    })
}
//取消订单
export const CancelAnOrder = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-orders/cancel-order?orderId=${data.orderId}`,
        data
    })
}
//支付
export const PayOrder = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-orders/pay-order?orderId=${data.orderId}&cancelUrl=http://www.xpertbay.com/UseMyOrder&successUrl=http://www.xpertbay.com/UseMyOrder`,
        data
    })
}
//卖家评价
export const Sellcoves = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders-review/seller-order-review`,
        data
    })
}
// 客户评价订单
export const CustomerReviewOrder = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders-review/buyer-order-review`,
        data
    })
}
// 买家浏览记录
export const BuyerBrowsingHistory = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-browse-log/get-recently-user`,
        data
    })
}
// 关联用户列表
export const AssociatedUserList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-seller/get-relevance-user?sellerUserId=${data.sellerUserId}`,
        data
    })
}
// 进会议
export const EnterTheMeeting = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-orders/enter-meeting?orderId=${data.orderId}`,
        data
    })
}
// 卖家订单评价
export const SellerRrderEvaluation = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-orders-review/seller-order-review`,
        data
    })
}
// 修改订单价格
export const ModifyOrderPrice = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-orders/edit-price?orderId=${data.orderId}&price=${data.price}`,
        data
    })
}
// //获取收藏分组
export const GetCollectionGroup = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/favorite/page?type=${data.type}&name=${data.name}&pageSize=${data.pageSize}&pageNo=${data.pageNum}`,
        data
    })
}
// 创建apply
export const CreateApply = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-request-apply/create`,
        data
    })
}
// 卖家request申请列表
export const SellerRequestApplicationList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-request-apply/page?pageNo=${data.pageNum}&pageSize=${data.pageSize}`,
        data
    })
}
// 卖家修改request申请列表
export const SellerReviselicationList = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/xp-request-apply/edit`,
        data
    })
}
// 取消request申请列表
export const CanelReviselicationList = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/xp-request-apply/cancel?requestApplyId=${data.requestApplyId}`,
        data
    })
}
// 创建收藏分组
export const CreateACollectionGroup = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/favorite/create?name=${data.name}&type=${data.type}`,
        data
    })
}
// 获取分组列表数据
export const GetGroupedListData = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/favorite/get-favorite-user-group?id=${data.id}`,
        data
    })
}
// 编辑收藏分组
export const EditFavoriteGroup = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/favorite/update?id=${data.id}&name=${data.name}`,
        data
    })
}
//删除收藏分组
export const DetleFavoriteGroup = (data) => {
    return axios({
        method: 'delete',
        url: `/xpert-api/xpert/favorite/delete?id=${data.id}`,
        data
    })
}
//gigs分组list
export const GigsGroupList = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/favorite/get-favorite-gigs-group?id=${data.id}`,
        data
    })
}
//获取用户未读数
export const GetUserUnread = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-message/unread-count`,
        data
    })
}
//获取用户未读消息
export const GetUserUnreadMessage = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-message/unread-page?pageNo=1&pageSize=4`,
        data
    })
}
//获取用户消息
export const GetUserMessages = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-message/page?pageNo=${data.pageNum}&pageSize=${data.pageSize}&type=${data.type}`,
        data
    })
}
//站内信未读统计
export const UnreadStatisticsMessages = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-message/unreadTotal`,
        data
    })
}
//取消状态 消息
export const CancelStatusMessage = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-message/get?notifyId=${data.notifyId}`,
        data
    })
}
//获取站内信息配置
export const GetSiteInformationConfiguration = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/notify-config/get`,
        data
    })
}
//发送邮箱验证码
export const SendEmailVerificationCode = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/notify-config/send-notify-email-code`,
        data
    })
}
//发送邮箱验证码
export const SendEmaiSMS = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/notify-config/send-notify-sms-code`,
        data
    })
}
//验证手机验证码
export const VerifyMobilePhoneVerificationCode = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/notify-config/verify-notify-sms-code?code=${data.code}`,
        data
    })
}
//验证邮箱验证码
export const VerifyMobileEmlsificationCode = (data) => {
    return axios({
        method: 'put',
        url: `/xpert-api/xpert/notify-config/verify-notify-email-code?code=${data.code}`,
        data
    })
}
//保存站内信息
export const SaveSiteInformation = (data) => {
    return axios({
        method: 'post',
        url: `/xpert-api/xpert/notify-config/update`,
        data
    })
}
//获取卖家收款卡信息
export const GetsPaymentCardInformation = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-seller/get-account-pay-card`,
        data
    })
}
//获取卖家收款卡信息
export const GetAccountLink = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/xpert/xp-client-user-detail-seller/get-account-link?&successUrl=${data.successUrl}&cancelUrl=${data.cancelUrl}`,
        data
    })
}
//聊天token
export const ChatToken = (data) => {
    return axios({
        method: 'get',
        url: `/xpert-api/chat/chat-token`,
        data
    })
}